# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=libbfio
pkgver=324.5b07d07
pkgrel=1
pkgdesc='A library to provide basic file input/output abstraction.'
arch=('x86_64' 'aarch64')
url='https://github.com/libyal/libbfio'
license=('LGPL3')
provides=('libbfio')
makedepends=('git' 'autoconf' 'automake' 'libtool' 'gettext' 'pkg-config'
             'bison' 'flex')
source=("git+https://github.com/libyal/$pkgname.git")
sha512sums=('SKIP')

_gitname='libbfio'

pkgver() {
  cd $_gitname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $_gitname

  ./synclibs.sh
  ./autogen.sh
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc

  make
}

package() {
  cd $_gitname

  make DESTDIR="$pkgdir" install
}

